package com.chengqj.strategy;

/**
 * @program: pattern
 * @description: Strategy模式调用类
 * @author: chengqj
 * @create: 2018-07-30 18:30
 **/
public class Client {
    private Strategy strategy;

    public Client(Strategy strategy) {
        this.strategy = strategy;
    }

    public void algorithmInterface(){
        strategy.algorithmInterface();
    }

    public static void main(String[] args) {
        Client client = new Client(new StrategyA());
        client.algorithmInterface();
    }
}
